import VueRouter from 'vue-router'
import HomeContainer from './components/tabbar/HomeContainer.vue'
import MemberContainer from './components/tabbar/MemberContainer.vue'
import ShopcarContainer from './components/tabbar/ShopcarContainer.vue'
import SearchContainer from './components/tabbar/SearchContainer.vue'
import newsList from './components/newslist/newsList.vue'
import newsInfo from './components/newslist/newsInfo.vue'
import photoShare from './components/photo/photoShare.vue'
import photoInfo from './components/photo/photoInfo.vue'
import goodsList from './components/goodslist/goodsList.vue'
import goodInfo from './components/goodslist/goodInfo.vue'
import goodsDesc from './components/goodslist/goodsDesc.vue'
import goodsComment from './components/goodslist/goodsComment.vue'
//创建路由对象
var router = new VueRouter({
    routes:[
        {path:'/',redirect:'/home'},
        {path:'/home',component:HomeContainer},
        {path:'/member',component:MemberContainer},
        {path:'/shopcar',component:ShopcarContainer},
        {path:'/search',component:SearchContainer},
        {path:'/home/newslist',component:newsList},
        {path:'/home/newsinfo/:id',component:newsInfo},
        {path:'/home/photoshare',component:photoShare},
        {path:'/home/photoinfo/:id',component:photoInfo},
        {path:'/home/goodslist',component:goodsList},
        {path:'/home/goodinfo/:id',component:goodInfo,name:'goodinfo'},
        {path:'/home/goodsdesc/:id',component:goodsDesc,name:'goodsdesc'},
        {path:'/home/goodscomment/:id',component:goodsComment,name:'goodscomment'}
    ],
    linkActiveClass: 'mui-active'  //覆盖默认的 router-link-active
})

export default router